package com.ttsx.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ttsx.core.mybatis.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.List;

/**
 * 订单表
 * @author lucky
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class Order extends BaseEntity {

    private String orderNo;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 收货地址ID
     */
    private Long addrId;

    /**
     * 支付方式
     */
    private Integer payMethod;

    /**
     * 运费
     */
    private BigDecimal postage;

    /**
     * 总价
     */
    private BigDecimal totalAmount;

    /**
     * 订单状态
     */
    private Integer orderStatus;

    /**
     * 支付时间
     */
    //private LocalDateTime payTime;

    @TableField(exist = false)
    private UserAddress address;

    @TableField(exist = false)
    private String orderStatusDesc;

    @TableField(exist = false)
    private User user;

    @TableField(exist = false)
    private List<OrderItem> orderItems;
}